findFragment

open fun <F : Fragment?> findFragment(@NonNull view: View): F(source)

Find a Fragment associated with the given View. This method will locate the Fragment associated with this view. This is automatically populated for the View returned by onCreateView and its children.

Return

the locally scoped Fragment to the given view

Parameters

view

the view to search from

Throws

if the given view does not correspond with a Fragment.